package com.zf.shuashua.manager;

import com.vise.xsnow.http.callback.ACallback;
import com.zf.shuashua.api.HttpData;
import com.zf.shuashua.api.Store;
import com.zf.shuashua.bean.BaseData;

/**
 * 记录用户浏览视频标签
 */
public class ReportVideoTagManager {

    private static ReportVideoTagManager instance;

    private ReportVideoTagManager() {

    }

    public static ReportVideoTagManager getInstance() {
        if (null == instance) {
            synchronized (ReportVideoTagManager.class) {
                if (null == instance) {
                    instance = new ReportVideoTagManager();
                }
            }
        }
        return instance;
    }

    /**
     * 记录用户浏览视频标签
     * @param video_id         视频 ID
     * @param start_timestamp  开始时间
     */
    public synchronized void reportVideoTag(int video_id, long start_timestamp, long end_timestamp){
//        if(video_id <= 0){
//            return;
//        }
//        if(end_timestamp - start_timestamp < 1000){
//            return;
//        }
//        if(!Store.getInstance().isLogin()){
//            return;
//        }
//        HttpData.getInstance().reportVideoTag(video_id, start_timestamp, end_timestamp, new ACallback<BaseData>() {
//            @Override
//            public void onSuccess(BaseData data) {
//
//            }
//
//            @Override
//            public void onFail(int errCode, String errMsg) {
//            }
//        });
    }

}
